package com.sikaryofficial.backend.domain.dto.resp.prize;

import com.sikaryofficial.backend.constant.PrizeRedeemBusinessTypeEnum;
import com.sikaryofficial.backend.domain.dto.resp.AddressUserListDTO;
import com.sikaryofficial.common.core.annotation.LocalDateTimeFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.ToString;

import java.io.Serializable;
import java.util.Date;

/**
 * 兑奖列表DTO
 *
 * @author qinjinyuan
 * @date 2024-07-15
 */
@Getter
@Setter
@ToString
@NoArgsConstructor
@AllArgsConstructor
@ApiModel(value = "兑奖列表DTO", description = "兑奖列表DTO")
public class PrizeRedeemDTO implements Serializable {
    private static final long serialVersionUID = 1L;
    /**
     * 奖品兑换结果表ID
     */
    @ApiModelProperty(value = "兑奖ID", example = "0")
    private Long prizeRedeemId;

    @ApiModelProperty(value = "活动ID")
    private Long activityId;
    /**
     * 奖品ID
     */
    @ApiModelProperty(value = "奖品ID")
    private Long prizeId;

    @ApiModelProperty(value = "奖品名称", example = "0")
    private String prizeName;

    /**
     * 奖品封面
     */
    @ApiModelProperty(value = "奖品封面", example = "奖品封面")
    private String prizeCover;
    /**
     * 兑换数量
     */
    @ApiModelProperty(value = "兑换数量", example = "0")
    private Integer redeemNumber;
    /**
     * 业务类型 1-积分兑换,2-大转盘,3-刮刮乐,4-积分预约0元定时抢购
     */
    @ApiModelProperty(value = "业务类型 1-积分兑换,2-大转盘,3-刮刮乐,4-积分预约0元定时抢购", example = "1")
    private Integer businessType;

    @ApiModelProperty(value = "业务类型 描述", example = "1")
    private String businessTypeDesc;

    public String getBusinessTypeDesc() {
        return  PrizeRedeemBusinessTypeEnum.getNameByCode(this.businessType);
    }
    /**
     * 奖品类型:1-虚拟礼品 2-实物礼品 3-谢谢惠顾
     */
    @ApiModelProperty(value = "奖品类型:1-虚拟礼品 2-实物礼品 3-谢谢惠顾", example = "1")
    private Integer prizeType;
    /**
     * 创建时间
     */
    @ApiModelProperty(value = "创建时间", example = "yyyy-MM-dd HH:mm:ss")
    @LocalDateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createdTime;

    /** 我的地址ID */
    @ApiModelProperty(value = "我的地址ID")
    private Long userAddressId;

    /** 创建人 */
    @ApiModelProperty(value = "用户ID")
    private Long createdBy;

    @ApiModelProperty(value = "21岁证明地址", example = "sikary/2024/03/29/20240329062702A216.jpeg")
    private String proofUrl;

    @ApiModelProperty(value = "是否有21岁证明地址,有:true 无:false ", example = "false")
    private boolean hasProofUrl;

    /**
     * 昵称
     */
    @ApiModelProperty(value = "昵称", example = "张三")
    private String nickName;
    /**
     * 邮箱
     */
    @ApiModelProperty(value = "邮箱", example = "1332435")
    private String email;

    /**
     * 邮编(可选)
     */
    @ApiModelProperty(value = "邮编(可选)")
    private String postCode;
    /**
     * 手机号
     */
    @ApiModelProperty(value = "手机号", example = "135****8888")
    private String phoneNumber;

    /**
     * 名字
     */
    @ApiModelProperty(value = "名字", example = "张三")
    private String firstName;

    /**
     * 姓
     */
    @ApiModelProperty(value = "姓", example = "张")
    private String lastName;

    @ApiModelProperty(value = "发货地址", example = "发货地址")
    private AddressUserListDTO addressObj;

    /**
     * 奖品发放状态 0-未发放 1-已发放
     */
    @ApiModelProperty(value = "奖品发放状态 0-未发放 1-已发放", example = "0")
    private Integer prizeGrantStatus;

    /**
     * 是否是现金 0-否 1-是，默认0-否
     */
    @ApiModelProperty(value = "是否是现金 0-否 1-是，默认0-否", example = "0")
    private int hasCash;
}
